<?php
    @header("Content-type:text/html;chaset=utf-8");
    const host = "b-ht4qwnlkz1tt0q.bch.rds.gz.baidubce.com:3306";
    const user = "b_ht4qwnlkz1tt0q";
    const pwd = "12345678";
    const dbName = "b_ht4qwnlkz1tt0q";

    // $conn = mysqli_connect("127.0.0.1:3306","root","root","hong");
    $conn = mysqli_connect(host,user,pwd,dbName);

    mysqli_query($conn,"set names utf-8");
    mysqli_query($conn,"set charater set utf-8");

    // print_r($conn);

    if(!$conn){
        exit("数据库连接失败!");
    }

?>